The present invention relates to a method and apparatus for controlling a motor and, more particularly, to control executed when a mechanism is driven using a motor as a power source.
Currently, motors are used as power sources of various apparatuses. Especially, many OA devices and home electric appliances use DC motors because they have simple structures, require no maintenance, generate little rotation variation and vibration, and are capable of high-speed operation and accurate control.
In recent years, printers, and especially general commercial printers that are often for home use, are required to have not only higher image quality but also lower operation noise. Noise generated in operation includes that generated in printing and that generated in driving mechanical portions. In inkjet printing apparatuses which have only a few noise sources in printing, noise generated in driving mechanical portions is reduced.
An inkjet printing apparatus has, as its main mechanical portions, a printhead scanning mechanism and a printing medium convey mechanism. Noise is reduced by using a DC motor and linear encoder as a driving means for the printhead scanning mechanism. Today, a DC motor and rotary encoder are also being employed as a driving means for the printing medium convey mechanism in many cases.
From the viewpoint of noise reduction, an effect can be expected when a DC motor is employed. From the viewpoint of accurate printing medium conveyance, more advanced position control is required in addition to a mechanical accuracy.
In an inkjet printing apparatus, the printhead is mounted on a carriage, which is driven by a motor. By way of example, control of the motor can be divided broadly into three control regions, namely an acceleration control region, a constant-velocity control region and a deceleration control region. In general, the printing operation is performed in the constant-velocity control region in order to assure image quality by holding the ink ejection interval constant. Though there are also systems in which printing is carried out also in the acceleration and deceleration control regions in order to raise printing speed, in all cases it is desired that any fluctuation in carriage velocity be made as small as possible during execution of printing. Accordingly, velocity servo control is suited as the feedback control method in the period during which printing is performed, i.e., in the constant-velocity control region. The reason for this is that velocity servo control is feedback control the aim of which is to make the velocity of the controlled system at a certain time coincide with a target velocity.
The specification of Japanese Patent Application Laid-Open No. 2001-63168 describes a motor control apparatus for performing stable control at the timing of a change from velocity control to position control. A conventional example of motor control, inclusive of the content set forth in the above specification, will now be described.
FIG. 4 is a block diagram illustrating the ordinary feedback control procedure of a motor employing velocity servo control. Such velocity servo control is performed by a technique referred to as PID control or classical control. This procedure will now be set forth.
First, a target velocity desired to be imparted to a controlled system is applied in the form of an ideal velocity profile 4001. The profile provides velocity command values at applicable times. This velocity information changes with the passage of time. Drive is controlled by performing variable-value control with regard to the ideal velocity profile.
In velocity servo control, a PID operation generally is carried out. This is an operation involving a proportionality term P, an integration term I and a differentiation term D. The difference is found between encoder velocity information, which is obtained by encoder velocity information conversion means 4005 based upon information detected by an encoder sensor 4004, and the velocity command value obtained from the ideal velocity profile 4001. This numerical value is delivered to a PID arithmetic circuit 4002 as a velocity error, which is the velocity shortfall relative to the target velocity. Through a technique referred to as a PID operation, the PID arithmetic circuit 4002 calculates the energy that is to be applied to a DC motor 4003 at this time. Upon receiving this energy, the motor driver circuit regulates the current value by changing the duty of the applied voltage through, e.g., pulse-width modulation (PWM) control, thereby effecting velocity control by regulating the energy applied to the DC motor 4003.
The DC motor, which is rotated owing to application of the current value, rotates physically while being influenced by an external disturbance 4006. The output of the motor is fed back by being sensed by the encoder sensor 4004.
FIG. 5 is a graph illustrating an example of the relationship between time and both velocity and present position owing to the above-described control. In FIG. 5, time is plotted along a horizontal axis 5051, velocity along a vertical axis 5052 on the left side and position along a vertical axis 5053 on the right side.
With regard to position indicated along the vertical axis on the right side, numeral 5043 denotes the position at which printing starts and 5042 the position at which printing ends. The interval between points 5043 and 5042 represents the printing region. Numeral 5041 denotes an arrival position, namely the position eventually reached by rapid deceleration following the end of printing.
With regard to velocity indicated along the vertical axis on the left side, numeral 5031 denotes attainment velocity of the carriage sought in order to implement an ink ejection frequency desirable for printing. Numeral 5032 denotes the initial velocity in the ideal profile.
Further, the ideal velocity profile is indicated at 5001. This signifies the best velocity profile in which the printing region between the printing starting position 5043 and printing end position 5042 is traversed by the attainment velocity 5031, with the carriage coming to rest at the arrival position 5041 upon being promptly decelerated. The ideal velocity profile 5001 is composed of an acceleration control region 5011, an ideal constant-velocity control region 5012 and an ideal deceleration control region 5013 along the time axis.
Numeral 5004 denotes an ideal position profile, which indicates the transition of position in a case where drive is performed in accordance with the ideal velocity profile 5001. Time that passes through the printing starting position 5043 in the ideal position profile 5004 is an ideal time 5021 for starting printing. This generally indicates the ideal time at which constant-velocity control begins. Similarly, time that passes through the printing end position 5042 in the ideal position profile 5004 is an ideal time 5023 for ending printing. This generally indicates the ideal time at which deceleration control begins.
Numerals 5003 and 5005 denote actual velocity and actual position profiles, respectively. The actual velocity profile 5003 is composed of the acceleration control region 5011, an actual constant-velocity control region 5014 and an actual deceleration control region 5015 along the time axis.
If variable-value control is applied to the ideal velocity profile 5001 by the velocity servo control described in FIG. 4, the actual velocity will always follow up the ideal velocity with a certain delay. This means that even if the ideal time 5021 for starting printing arrives, the attainment velocity 5031 will not be reached and neither will the printing starting position 5043. The printing starting position 5043 is reached only when the actual time 5022 for starting printing arrives. During travel through the printing region from this point onward, constant-velocity control is required in order to suppress a fluctuation in velocity; hence, a transition to deceleration control is not allowed. As a result, the printing end position 5042 is reached after a delay similar to the delay involved in arriving at the printing starting position 5043. This moment in time is an actual time 5024 at which printing ends. This is the actual time at which deceleration control starts.
Numeral 5002 denotes an ideal velocity profile that has been re-calculated based upon the actual time 5024 at which deceleration control starts. Actual deceleration control is carried out by variable-value control with regard to the ideal velocity profile 5002.
With the control described above, however, the delay in time involved in reaching the printing starting position 5043 lengthens the time needed for overall control. As a consequence, time until the end of printing lengthens and the overall printing speed declines.
In order to solve this problem, consider a technique in which the above-described control is applied only to the regions from the constant-velocity control region onward and position servo control is applied to the acceleration control region. An instance where position servo control is applied to the acceleration control region in this technique will now be described.
FIG. 6 is a block diagram illustrating ordinary feedback control of a carriage motor using position servo control. Components in FIG. 6 identical with those shown in FIG. 4 are designated by like reference characters.
First, a target position desired to be imparted to a controlled system is applied in the form of an ideal position profile 6001. The profile provides position command values at applicable times. This position information changes with the passage of time. Drive is executed by performing variable-value control with regard to the ideal position profile.
The apparatus is provided with the encoder sensor 4004, which senses physical rotation of the motor. Encoder position information conversion means 6003 counts the number of slits sensed by the encoder sensor 4004 and obtains absolute-position information. The encoder velocity information conversion means 4005 calculates the actual driving velocity of the motor from the signal provided by the encoder sensor 4004 and a clock built in the printer.
A value that is the result of subtracting the actual physical position obtained by the encoder position information conversion means 6003 from the ideal position profile 6001 is delivered to subsequent position servo-control feedback processing (a major loop for position servo control) 6002 as a position error, which is the position shortfall relative to the target position. The major loop 6002 for position servo control generally is means for performing a calculation relating to the proportionality term P.
A velocity command value is output as the result of the calculation performed by the loop 6002. The velocity command value is delivered to velocity servo-control feedback processing starting with circuit 4002. In the minor loop for velocity servo control, generally the PID operation is performed, namely the operation involving the proportionality term P, integration term I and differentiation term D.
In the minor loop for velocity servo control, a numerical value that is the result of subtracting the encoder velocity information from the velocity command value is delivered to the PID arithmetic circuit 4002 as the velocity error, which is the velocity shortfall relative to the target velocity. Through the technique referred to as PID, the PID arithmetic circuit 4002 calculates the energy that is to be applied to a DC motor 4003 at this time. Upon receiving this energy, the motor driver circuit regulates the current value by changing the duty of the applied voltage through, e.g., PWM control, thereby implementing velocity control by regulating the energy applied to the DC motor 4003.
The DC motor, which is rotated owing to application of the current value, rotates physically while being influenced by the external disturbance 4006. The output of the motor is fed back by being sensed by the encoder sensor 4004.
FIG. 7 is a graph illustrating an example of the relationship between time and both velocity and position in control for a case where position servo control shown in FIG. 6 is applied to the acceleration control region and velocity servo control shown in FIG. 4 is applied to the regions from the constant-velocity control region onward. Portions in FIG. 7 identical with those shown in FIG. 5 are designated by like reference characters.
In comparison with the example shown in FIG. 5, the actual position profile 5005 follows the ideal position profile 5004 in extremely accurate fashion, and the difference between the ideal time 5021 for starting printing and the actual time 5022 for starting printing is very small. This alleviates the aforementioned drawback encountered in velocity servo control, namely the fact that the delay in time involved in reaching the printing starting position 5043 lengthens the time needed for overall control, resulting in diminished printing speed overall.
If control is exercised in this manner, however, the following problem arises owing to execution of position servo control in the acceleration control region 5011:
Since precise control of velocity cannot be performed in the position servo-control interval, the occurrence of a fluctuation in velocity cannot be suppressed. As a consequence, it is not possible to control velocity at the moment of changeover from position servo control to velocity servo control, i.e., at the moment constant-velocity control starts, and velocity fluctuates even after the transition is made to the printing region. As a result, the driving frequency of the printhead cannot be held constant in the printing region, a variation occurs in the size of the ink drops ejected in an inkjet printer, and the original printing performance of the apparatus cannot manifest itself.
Accordingly, a first object of the present invention is to provide a motor control method through which target-velocity attainment time is shortened and velocity fluctuation reduced after the target velocity is attained.
A second object of the present invention is to provide a motor control apparatus through which target-velocity attainment time is shortened and velocity fluctuation after attainment of the target velocity is reduced.
According to the present invention, the first object is attained by providing a motor control method of controlling a motor in a device in which a mechanism is driven using the motor as a power source, comprising: a velocity servo-control step of outputting first command information regarding the motor based upon a preset velocity profile and information relating to velocity of the mechanism; a position servo-control step of outputting second command information regarding the motor based upon a preset position profile and information relating to position of the mechanism; and a driving signal generating step of generating a driving signal of the motor, based upon the first and second command information, in a region in which the mechanism is to be accelerated in the velocity profile.
According to the present invention, the second object is attained by providing an apparatus for controlling a motor in a device in which a mechanism is driven using the motor as a power source, comprising: velocity servo-control means for outputting first command information regarding the motor based upon a preset velocity profile and information relating to velocity of the mechanism; position servo-control means for outputting second command information regarding the motor based upon a preset position profile and information relating to position of the mechanism; and driving signal generating means for generating a driving signal of the motor, based upon the first and second command information, in a region in which the mechanism is to be accelerated in the velocity profile.
Thus, in accordance with the present invention, control of a motor in a device in which a mechanism is driven using the motor as the power source is achieved by providing velocity servo-control means for outputting first command information regarding the motor based upon a preset velocity profile and information relating to velocity of the mechanism, and position servo-control means for outputting second command information regarding the motor based upon a preset position profile and information relating to position of the mechanism, wherein a motor driving signal is generated, based upon the first and second command information, in a region in which the mechanism is to be accelerated in the velocity profile.
Adopting such an arrangement makes it possible to achieve motor control that incorporates both the advantage of position servo control, namely a short period of time until attainment of target position, and the advantage of velocity servo control, namely attainment of velocity target velocity in smooth fashion.
As a result, target-velocity attainment time is shortened and velocity fluctuation after attainment of the target velocity is reduced.
Preferably, the driving signal may be generated by multiplying the second command information by a coefficient that varies depending upon time.
Preferably, the coefficient takes on a maximum value at start of acceleration and a minimum value at end of acceleration.
The driving signal of the motor may be generated based upon the first command information alone in a region in which the mechanism is to be driven at a constant velocity in the velocity profile.
Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof.